
list1 = [1, 2, 3, 4, 5]

def add(c):
    return c + 10

list2 = list(map(add, list1))
print(list2)

list3 = list(map(lambda c: c + 10, list1))
print(list3)

list4 = [c + 10 for c in list1]
print(list4)

list5 = [c * 2 for c in list1 if c % 2 == 0]
print(list5)

list6 = [c * 2 if c % 2 == 0 else c + 10 for c in list1]
print(list6)

list7 = [c * 2 if c % 2 == 0 else c + 10 for c in list1 if c > 2]
print(list7)

list8 = [c for c in range(10)]
print(list8)   

list9 = [c for c in range(10) if c % 2 == 0]
print(list9)

list10 = [c * 2 for c in range(10) if c % 2 == 0]
print(list10)

list11 = [c * 2 if c % 2 == 0 else c + 10 for c in range(10) if c > 2]
print(list11)   

list12 = [m + n for m in 'ABC' for n in '123']
print(list12)   

list13 = [m + n for m in 'ABC' if m != 'A' for n in '123' if n != '3']
print(list13)

list14 = [(m, n) for m in 'ABC' for n in '123']
print(list14)

list15 = [(m, n) for m in 'ABC' if m != 'A' for n in '123' if n != '3']
print(list15)   

list16 = [d for d in {'x': 1, 'y': 2, 'z': 3}]
print(list16)

list17 = [d for d in {'x': 1, 'y': 2, 'z': 3}.items()]
print(list17)   

list18 = [d for d in {'x': 1, 'y': 2, 'z': 3}.values()]
print(list18)

list19 = [d for d in {'x': 1, 'y': 2, 'z': 3}.keys()]
print(list19)   

list20 = [s.lower() for s in ['Hello', 'World', 'IBM']]
print(list20)   

list21 = [s.lower() for s in ['Hello', 'World', 'IBM'] if len(s) > 3]
print(list21)

list22 = [s.lower() if len(s) > 3 else s.upper() for s in ['Hello', 'World', 'IBM']]
print(list22)

list23 = [s.lower() if len(s) > 3 else s.upper() for s in ['Hello', 'World', 'IBM'] if len(s) > 2]
print(list23)

list24 = [s for s in ['Hello', 'World', 'IBM'] if len(s) > 2]
print(list24)    